package cn.doitedu.datayi.demos;

import org.lionsoul.ip2region.DataBlock;
import org.lionsoul.ip2region.DbConfig;
import org.lionsoul.ip2region.DbMakerConfigException;
import org.lionsoul.ip2region.DbSearcher;

public class Ip2RegionDemo {

    public static void main(String[] args) throws Exception {


        DbConfig dbConfig = new DbConfig();
        DbSearcher dbSearcher = new DbSearcher(dbConfig, "data\\ip2region\\ip2region.db");

        DataBlock dataBlock = dbSearcher.memorySearch("222.64.152.13");

        System.out.println(dataBlock.getRegion());


    }
}
